<%--
  Created by IntelliJ IDEA.
  User: 轩大晨
  Date: 2019/7/15
  Time: 18:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>



    <div>
        <div style="color: #faca0d; font-weight:bold ; ">发表人:${moment.author}</div>
        <div style="color: #a2d866;">发表时间:${moment.showDate}</div>
        <div style="color: #3b6209">点赞人数:${moment.like}</div>
        <div style="color: black;font-weight: bolder;font-size: 20px;" >时刻内容:${moment.content}${isImg==0}</div>
        <c:if test="${moment.img != null}">
            <div>
                <%--<c:if test="${isImg==1}">
                    <img src="${pageContext.request.contextPath }/statics/images/${moment.img}"/>
                </c:if>
                <c:if test="${isImg==0}">
                    <video controls="controls" width="400px" height="200px" src="${pageContext.request.contextPath }/statics/images/${moment.img}"></video>
                </c:if>--%>

                <%--<img src="${pageContext.request.contextPath }/statics/images/${moment.img}"/>--%>
            <c:choose>
                <c:when test="${isImg==1}">
                    <img src="${pageContext.request.contextPath }/statics/images/${moment.img}"/>
                </c:when>
                <c:when test="${isImg==0}">
                    <video controls="controls" width="400px" height="200px" src="${pageContext.request.contextPath }/statics/images/${moment.img}"></video>
                </c:when>
                <c:otherwise>
                    图片或视频正在赶来的路上...
                </c:otherwise>
            </c:choose>
            </div>
        </c:if>
    </div>
<form id="add" action="${pageContext.request.contextPath}/moment/addCommentSave.html">
    <div class="box">
        <span class="H">添加你的评论:</span>
        <textarea name="content" id="content"></textarea>
        <label for="content" id="txt" >在此添加评论！</label>
        <input type="submit" id="button" value="发布">
        <input type="hidden" name="moment_id" value="<%=request.getParameter("moment_id")%>"/>
    </div>

    看一下别的小伙伴都在说什麽吧...
    <c:forEach var="momentComment" items="${MomentCommentList }" varStatus="status">
        <tr><div>&nbsp;</div>
            <td>
                <div style="color: #faca0d; font-weight:bold ; " >${momentComment.commenter }</div>
            </td>
            <td>
                <div >${momentComment.showDate }&nbsp;&nbsp;说:</div>
            </td>
            <td>
                <div style="font-weight:bold ;color: #a2d866;font-size: 20px;" >${momentComment.content}</div>
            </td>
        </tr>
    </c:forEach>
</form>


</section>

<%@include file="/WEB-INF/jsp/common/foot.jsp" %>
